Repository navigation
CSTACKEX-262: Support for Compute + Volume migration and Volume migration - #112
sandeeplocharla wants to merge 14 commits into
Conversation
15f8e29 to
ddcebda
Compare
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 24.86% |
| Branch coverage | 18.99% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
e5c27c5 to
9416f32
Compare
9416f32 to
7bca4ca
Compare
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
575b714 to
26664a6
Compare
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.97% |
| Branch coverage | 20.26% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
26664a6 to
be02af2
Compare
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
…ation # Conflicts: # plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java # plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java # plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriverTest.java # plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedNASStrategyTest.java
…ject cross-protocol migration
# Conflicts: # plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java # plugins/storage/volume/ontap/src/test/java/org/apache/cloudstack/storage/service/UnifiedSANStrategyTest.java
fe0a3c6 to
6853195
Compare
piyush5netapp
left a comment
There was a problem hiding this comment.
Approving with some comments which can be taken in future.
| try { | ||
| destPool = storagePoolMgr.getStoragePool(destPrimaryStore.getPoolType(), destPrimaryStore.getUuid()); | ||
| } catch (CloudRuntimeException e) { | ||
| if (!destPrimaryStore.isManaged() || !e.getMessage().contains("not found")) { |
There was a problem hiding this comment.
what this check to throw error only if it is unmanaged ?
There was a problem hiding this comment.
Idea is to register the destination pool when it is a managed pool and is not found. Will make this code clear.
| } | ||
| } | ||
|
|
||
| protected void disconnectDestinationOntapIscsiDisksOnSourceHost(final LibvirtComputingResource libvirtComputingResource, |
There was a problem hiding this comment.
is not method name confusing one ? what does destination ontap iscsi disk means ?
There was a problem hiding this comment.
Also, I think the thing this method is taking care of should exist in ontap data motion strategy which ontapdatamotion strategy is already doing currently incase of failed migration. We can use the same method for successmigration also.
There was a problem hiding this comment.
Check handleFailedMigration method in OntapDataMotionStrategy
There was a problem hiding this comment.
Trying out an alternative, will let you know
Will wait for one comment reply on file LibvirtMigrateCommandWrapper |
| try { | ||
| destPool = storagePoolMgr.getStoragePool(destPrimaryStore.getPoolType(), destPrimaryStore.getUuid()); | ||
| } catch (CloudRuntimeException e) { | ||
| if (!destPrimaryStore.isManaged() || !e.getMessage().contains("not found")) { |
There was a problem hiding this comment.
cant compare with a stable error code instead error message? Null-check for msg is also required before contains.
There was a problem hiding this comment.
Unfortunately, cloudstack is a monolith and 'getStoragePool' is not an api call 😢
| if (progress != null && Integer.valueOf(100).equals(progress.getPercentComplete())) { | ||
| return; | ||
| } | ||
| if (progress != null && ("failed".equalsIgnoreCase(progress.getState()) || "failure".equalsIgnoreCase(progress.getState()) |
There was a problem hiding this comment.
what about the paused, paused_error state, how it is handled?
There was a problem hiding this comment.
I believe paused and paused_error are rare occurrences. Unless storage administrator requests lun copy to be paused it is unlikely to happen on it's own. Further, migration in cloudstack has a timeout of 18mins. So, I feel this should be alright.
|
|
||
| protected void waitForLunCopy(String authHeader, String lunUuid, long deadline) { | ||
| while (true) { | ||
| Lun lun = sanFeignClient.getLunCopyStatus(authHeader, lunUuid); |
There was a problem hiding this comment.
there is a possibility that copy object is missing or null initially and comes after some time, this logic should read the copy value again
There was a problem hiding this comment.
No, usually any WRITE Op in ONTAP is creating a DB entry and the GET call always returns it. If you remember, in another bug where GET lun is followed by PATCH lun, GET always responds with the object, while PATCH sometimes couldn't find the actual entity. So, this should be alright. Let's see if something gets uncovered in the future.
- LunMap: drop property-level NON_DEFAULT JsonInclude on logicalUnitNumber - KVMStorageProcessor: prefer copy details over command options, narrow not-found handling to managed volumes - OntapDataMotionStrategy: add disconnectVolumeFromHost helper used by failed and post-migration cleanup - LibvirtMigrateCommandWrapper: remove the disconnect wrapper method and its test - Add unit tests for the copy-details precedence and the new cleanup path
…ration QoS Offline migration calls createAsync with a null callback and reads no result, so a failed create must throw instead of returning silently. The post-migration QoS reapply now retries twice more with a short wait, then logs and continues, because the VM has already moved and a failed patch must not expunge its disks.
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Live VM with volumes (
migrateVirtualMachineWithVolume)migrateVolumewith livemigrate on a running volume is rejectedStopped VM storage migration (
migrateVirtualMachineWithVolume, no destination host)Volume migration (
migrateVolume)